package org.keyroy.app.puzzle_rpg.models;

public class Map {
	public int gridWidth, gridHeight;
	public int rows, columns;
	public Tile[][] tiles;

	public Map(int columns, int rows, int gridWidth, int gridHeight) {
		this.rows = rows;
		this.columns = columns;
		this.gridWidth = gridWidth;
		this.gridHeight = gridHeight;
		tiles = new Tile[columns][rows];
	}

	public Tile[][] copyTiles() {
		Tile[][] rTiles = new Tile[columns][rows];
		for (int i = 0; i < rows; i++) {
			for (int j = 0; j < columns; j++) {
				rTiles[i][j] = tiles[i][j];
			}
		}

		return rTiles;
	}

	public int getWidth() {
		return columns * gridWidth;
	}

	public int getHeight() {
		return rows * gridHeight;
	}
}
